home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / beebe / h / stat < prev    next >
Encoding:
Text File  |  1990-05-18  |  611 b   |  26 lines

  1. /* Archimedes has no stat() call - lets fake one out of ansi stuff... */
  2.  
  3. /* We could use the Archimedes fileno out of the FILE* structure, but
  4.    I am implementing all 'low-level' stuff in Ansi procedures -- so I'll
  5.    just make a FILE* into a fileno by casting it. */
  6.  
  7. #define fileno(File) ((int)File)
  8.  
  9. typedef struct stat {
  10.   int st_size;
  11. } stattype;
  12.  
  13. int fstat(int fd, struct stat *statbuff) {
  14. FILE *f = (FILE *) fd;
  15.   statbuff->st_size = 0;
  16.   return(0);
  17. }
  18.  
  19. #include <string.h>
  20. char *cuserid(char *s) {
  21. char name[128];
  22.   /* Should translate Mail$Name */
  23.   strcpy(name, "Archimedes User");
  24.   return(name);
  25. }
  26.